package com.netease.financial.internal.di.components;

import android.content.Context;

import com.netease.financial.NfsApplication;
import com.netease.financial.domain.executor.PostExecutionThread;
import com.netease.financial.domain.executor.ThreadExecutor;
import com.netease.financial.domain.repository.NfsRepository;
import com.netease.financial.internal.di.modules.ApplicationModule;
import com.netease.financial.ui.activity.BaseActivity;
import com.netease.financial.ui.activity.BaseAppCompatActivity;

import javax.inject.Singleton;

import dagger.Component;

/**
 * A component whose lifetime is the life of the application.
 */
@Singleton // Constraints this component to one-per-application or unscoped bindings.
@Component(modules = ApplicationModule.class)
public interface ApplicationComponent {

    void inject(NfsApplication nfsApplication);

    void inject(BaseActivity baseActivity);

    void inject(BaseAppCompatActivity baseAppCompatActivity);

    //Exposed to sub-graphs.
    Context context();

    ThreadExecutor threadExecutor();

    PostExecutionThread postExecutionThread();

    NfsRepository userRepository();
}
